
public class LogicalOP {

	public static void main(String[] args) {
		int x, y, z;

		x = 1; y = 2; z = 3;
		System.out.println ("Test && ---> " + ((++x<0) && (++y>0)));
		System.out.println ("X = " + x + "  Y = " + y);

		x = 1; y = 2; z = 3;
		System.out.println ("Test & ---> " + ((++x<0) & (++y>0)));
		System.out.println ("X = " + x + "  Y = " + y);

		x = 1; y = 2; z = 3;
		System.out.println ("Test || ---> " + ((++x>0) || (++y<0)));
		System.out.println ("X = " + x + "  Y = " + y);

		x = 1; y = 2; z = 3;
		System.out.println ("Test | ---> " + ((++x<0) | (++y>0)));
		System.out.println ("X = " + x + "  Y = " + y);

		x = 1; y = 2; z = 3;
		System.out.println ("Test ! ---> " + ( ! (++x<0)));
		System.out.println ("X = " + x);

		x = 1; y = 2; z = 3;
		System.out.println ("Test ^ ---> " + ((++x<0) ^ (++y>0)));
		System.out.println ("X = " + x + "  Y = " + y);
	}

}
